home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload Trio 2 / Shareware Overload Trio Volume 2 (Chestnut CD-ROM).ISO / dir42 / fpw_dk.zip / DOPATCH.BAT next >
DOS Batch File  |  1994-09-28  |  12KB  |  463 lines

  1. echo off
  2.  
  3. cls
  4.  
  5. echo This program is used to apply patches to FoxPro version 2.6.
  6. echo.
  7. echo IMPORTANT NOTICE!
  8. echo.
  9. echo This batch file and all other patch files must be 
  10. echo located in the directory where FoxPro is located!
  11. echo If the patch files are not located in the directory
  12. echo where FoxPro is located, please press CTRL+C to
  13. echo terminate this program now.
  14. echo.
  15. echo This program uses the ATTRIB program to turn off the
  16. echo read only bit for all FoxPro files.  If the FoxPro
  17. echo files are marked as read only, and this program cannot
  18. echo use the ATTRIB program, the patch process may fail.
  19. echo If the patch process fails because the FoxPro files
  20. echo are marked as read only, please mark the files as
  21. echo read/write then re-execute this program.
  22. echo.
  23.  
  24. pause
  25.  
  26. REM ---------------------------------------------------------------------------------
  27. REM Check for required files
  28. REM ---------------------------------------------------------------------------------
  29.  
  30.     if exist fpw.exe goto prequired
  31.     if exist fpw_dk.exe goto prequired
  32.     if exist fpd.exe goto prequired
  33.     if exist fpd_dk.exe goto prequired
  34.  
  35.     cls
  36.  
  37.     echo WARNING!
  38.     echo.
  39.     echo The required files were not found.  The required 
  40.     echo files are one of: FPW.EXE, FPW_DK.EXE, FPD.EXE, 
  41.     echo and/or FPD_DK.EXE.  These required files are used
  42.     echo to patch FoxPro from version 2.6 to 2.6a.  If you
  43.     echo install optional files but do not install one of
  44.     echo the required files, FoxPro will not function properly.
  45.     echo.
  46.     echo This program will now proceed to install any optional
  47.     echo files which may exist in this directory on the assumption
  48.     echo that you have previously patched FoxPro and now wish to 
  49.     echo add update optional files.  If you have not previously
  50.     echo patched FoxPro, then it is imperative that you download
  51.     echo one of the required files and re-execute this procedure.
  52.     echo.
  53.     echo If you do not wish to proceed, please press CTRL+C
  54.     echo to terminate this program now.
  55.     echo.
  56.     pause
  57.  
  58. REM ---------------------------------------------------------------------------------
  59. REM Apply the patches to FoxPro
  60. REM ---------------------------------------------------------------------------------
  61.  
  62. :prequired
  63.     
  64.     :pfpw
  65.     if exist fpw.exe goto fpw
  66.  
  67.     :pfpw_dk
  68.     if exist fpw_dk.exe goto fpw_dk
  69.  
  70.     :pfpd
  71.     if exist fpd.exe goto fpd
  72.  
  73.     :pfpd_dk
  74.     if exist fpd_dk.exe goto fpd_dk
  75.  
  76.     goto poptional
  77.  
  78. REM ---------------------------------------------------------------------------------
  79. REM Apply the patches to FoxPro for Windows without DK
  80. REM ---------------------------------------------------------------------------------
  81.  
  82. :fpw
  83.  
  84.     cls
  85.     echo Applying patches to FoxPro for Windows without DK
  86.     fpw.exe -o
  87.     attrib -r foxpr*.exe
  88.     attrib -r fox*.esl
  89.     attrib -r fox*.eso
  90.     attrib -r fox*.ovl
  91.     patch -p
  92.     attrib +r foxpr*.exe
  93.     attrib +r fox*.esl
  94.     attrib +r fox*.eso
  95.     attrib +r fox*.ovl
  96.     call vpatch
  97.     del patch.dbf
  98.     del patch.exe
  99.     del sdk.fpf
  100.     del w26a.fpf
  101.     goto pfpw_dk
  102.  
  103. REM ---------------------------------------------------------------------------------
  104. REM Apply the patches to FoxPro for Windows with DK
  105. REM ---------------------------------------------------------------------------------
  106.  
  107. :fpw_dk
  108.  
  109.     cls
  110.     echo Applying patches to FoxPro for Windows with DK
  111.     fpw_dk.exe -o
  112.     attrib -r foxpr*.exe
  113.     attrib -r fox*.esl
  114.     attrib -r fox*.eso
  115.     attrib -r fox*.ovl
  116.     patch -p
  117.     attrib +r foxpr*.exe
  118.     attrib +r fox*.esl
  119.     attrib +r fox*.eso
  120.     attrib +r fox*.ovl
  121.     call vpatch
  122.     del patch.dbf
  123.     del patch.exe
  124.     del esl.fpf
  125.     del w26a.fpf
  126.     goto pfpd
  127.  
  128. REM ---------------------------------------------------------------------------------
  129. REM Apply the patches to FoxPro for MS-DOS without DK
  130. REM ---------------------------------------------------------------------------------
  131.  
  132. :fpd
  133.  
  134.     cls
  135.     echo Applying patches to FoxPro for MS-DOS with DK
  136.     fpd.exe -o
  137.     attrib -r foxpr*.exe
  138.     attrib -r fox*.esl
  139.     attrib -r fox*.eso
  140.     attrib -r fox*.ovl
  141.     patch -p
  142.     attrib +r foxpr*.exe
  143.     attrib +r fox*.esl
  144.     attrib +r fox*.eso
  145.     attrib +r fox*.ovl
  146.     call vpatch
  147.     del patch.dbf
  148.     del patch.exe
  149.     del dos.fpf
  150.     del dosx.fpf
  151.     del ovl.fpf
  152.     goto pfpd_dk
  153.  
  154. REM ---------------------------------------------------------------------------------
  155. REM Apply the patches to FoxPro for MS-DOS with DK
  156. REM ---------------------------------------------------------------------------------
  157.  
  158. :fpd_dk
  159.  
  160.     cls
  161.     echo Applying patches to FoxPro for MS-DOS with DK
  162.     fpd_dk.exe -o
  163.     attrib -r foxpr*.exe
  164.     attrib -r fox*.esl
  165.     attrib -r fox*.eso
  166.     attrib -r fox*.ovl
  167.     patch -p
  168.     attrib +r foxpr*.exe
  169.     attrib +r fox*.esl
  170.     attrib +r fox*.eso
  171.     attrib +r fox*.ovl
  172.     call vpatch
  173.     del patch.dbf
  174.     del patch.exe
  175.     del DESL.FPF        
  176.     del DOSDK.FPF        
  177.     del DOSXDK.FPF       
  178.     del DXESL.FPF       
  179.     del ESO.FPF       
  180.     del LIBM.FPF       
  181.     del LIBR.FPF       
  182.     del MATHM.FPF       
  183.     del MATHR.FPF       
  184.     del OSXLIB.FPF       
  185.     del OVLDK.FPF       
  186.     del PROLIB.FPF       
  187.     del ROSLIB.FPF       
  188.     del WOVLIB.FPF       
  189.     del OXT.FPF       
  190.     del RTT.FPF       
  191.     del FOXT.FPF       
  192.     goto poptional
  193.  
  194. REM ---------------------------------------------------------------------------------
  195. REM Check to see which optional files have been downloaded, and execute
  196. REM each of the optional files
  197. REM ---------------------------------------------------------------------------------
  198.  
  199. :poptional
  200.  
  201.     :papps
  202.     if exist apps.exe goto apps
  203.     :pdbhlpd
  204.     if exist dbhlpd.exe goto dbhlpd
  205.     :pdbhlpw
  206.     if exist dbhlpw.exe goto dbhlpw
  207.     :pfoxapp
  208.     if exist foxapp.exe goto foxapp
  209.     :pfpwhlp
  210.     if exist fpwhlp.exe goto fpwhlp
  211.     :pgenpd
  212.     if exist genpd.exe goto genpd
  213.     :pgens
  214.     if exist gens.exe goto gens
  215.     :pwizcat
  216.     if exist wizcat.exe goto wizcat
  217.     :pck
  218.     if exist ck.exe goto ck
  219.  
  220.     goto end
  221.  
  222. REM ---------------------------------------------------------------------------------
  223. REM Update the BEAUTIFY.APP, FOXAPP.APP, FOXSTART.APP, MIGRATE.APP, and SPELLCHK.APP files
  224. REM ---------------------------------------------------------------------------------
  225.  
  226. :apps
  227.  
  228.     cls
  229.     echo Updating various .APP files
  230.     APPS -o -d
  231.  
  232. goto pdbhlpd
  233.  
  234. REM ---------------------------------------------------------------------------------
  235. REM Update the DBF style help file (FPD)
  236. REM ---------------------------------------------------------------------------------
  237.  
  238. :dbhlpd
  239.  
  240.     cls
  241.     echo Updating DBF help file (FPD)
  242.     DBHLPD -o -d
  243.  
  244. goto pdbhlpw
  245.  
  246. REM ---------------------------------------------------------------------------------
  247. REM Update the DBF style help file (FPW)
  248. REM ---------------------------------------------------------------------------------
  249.  
  250. :dbhlpw
  251.  
  252.     cls
  253.     echo Updating DBF help file (FPW)
  254.     DBHLPW -o -d
  255.  
  256. goto pfoxapp
  257.  
  258. REM ---------------------------------------------------------------------------------
  259. REM Update the FoxApp files
  260. REM ---------------------------------------------------------------------------------
  261.  
  262. :foxapp
  263.  
  264.     cls
  265.     echo Updating FoxApp files
  266.     FOXAPP -o -d
  267.  
  268. goto pfpwhlp
  269.  
  270. REM ---------------------------------------------------------------------------------
  271. REM Update the FoxPro/Windows Help files
  272. REM ---------------------------------------------------------------------------------
  273.  
  274. :fpwhlp
  275.  
  276.     cls
  277.     echo Updating FoxPro for Windows help file
  278.     FPWHLP -o -d
  279.  
  280. goto pgenpd
  281.  
  282. REM ---------------------------------------------------------------------------------
  283. REM Update the DRIVER2.FLL, GEN_PD.PRG, GENPD.APP, GENPD.PJT, and GENPD.PJX files
  284. REM ---------------------------------------------------------------------------------
  285.  
  286. :genpd
  287.  
  288.     cls
  289.     echo Updating Printer Driver files
  290.     GENPD -o -d
  291.  
  292. goto pgens
  293.  
  294. REM ---------------------------------------------------------------------------------
  295. REM Update the GENGRAPH.APP, GENMENU.PRG, GENSCRN.PRG, GENXTAB.PRG, and TRANSPRT.PRG files
  296. REM ---------------------------------------------------------------------------------
  297.  
  298. :gens
  299.  
  300.     cls
  301.     echo Updating gen* files
  302.     GENS -o -d
  303.  
  304. goto pwizcat
  305.  
  306. REM ---------------------------------------------------------------------------------
  307. REM Update the CATALOG MANAGER and WIZARDS
  308. REM ---------------------------------------------------------------------------------
  309.  
  310. :wizcat
  311.  
  312.     cls
  313.     echo Updating Catalog Manager and Wizards
  314.     WIZCAT -o -d
  315.  
  316. goto pck
  317.  
  318. REM ---------------------------------------------------------------------------------
  319. REM Update the Connectivity Kit
  320. REM ---------------------------------------------------------------------------------
  321.  
  322. :ck
  323.  
  324.     cls
  325.     echo Applying patches to FoxPro Connectivity Kit
  326.     CK -o -d
  327.     attrib -r foxpr*.exe
  328.     attrib -r fox*.esl
  329.     attrib -r fox*.eso
  330.     attrib -r fox*.ovl
  331.     patch -p
  332.     attrib +r foxpr*.exe
  333.     attrib +r fox*.esl
  334.     attrib +r fox*.eso
  335.     attrib +r fox*.ovl
  336.     call vpatch
  337.     del patch.dbf
  338.     del patch.exe
  339.     del fll.fpf
  340.     del plb.fpf
  341.     DEL wizards\wizard.dbf
  342.     DEL wizards\wizard.fpt  
  343.  
  344. goto end
  345.  
  346. REM ---------------------------------------------------------------------------------
  347. REM End of Patch Application Area
  348. REM ---------------------------------------------------------------------------------
  349.  
  350. :end
  351.  
  352.     cls
  353.  
  354. REM ---------------------------------------------------------------------------------
  355. REM File Deletion
  356. REM ---------------------------------------------------------------------------------
  357.  
  358. if exist foxapp.exe attrib -r foxapp.exe
  359.  
  360. if "%1" == "delete" goto delorig
  361. if "%1" == "DELETE" goto delorig
  362. goto delnone
  363.  
  364. :delorig
  365.  
  366.     echo Automatic File Deletion was selected.  
  367.     echo.
  368.     echo The files which were originally downloaded will 
  369.     echo now be deleted from the current directory.
  370.     
  371.     if exist apps.exe del apps.exe
  372.     if exist ck.exe del ck.exe
  373.     if exist dbhlpd.exe del dbhlpd.exe
  374.     if exist dbhlpw.exe del dbhlpw.exe
  375.     if exist foxapp.exe del foxapp.exe
  376.     if exist fpd.exe del fpd.exe 
  377.     if exist fpd_dk.exe del fpd_dk.exe 
  378.     if exist fpw.exe del fpw.exe 
  379.     if exist fpw_dk.exe del fpw_dk.exe 
  380.     if exist fpwhlp.exe del fpwhlp.exe
  381.     if exist genpd.exe del genpd.exe
  382.     if exist gens.exe del gens.exe
  383.     if exist wizcat.exe del wizcat.exe
  384.  
  385.     goto final
  386.  
  387. :delnone
  388.  
  389.     echo Automatic File Deletion was not selected.  
  390.     echo.
  391.     echo The files which were originally downloaded will 
  392.     echo not be deleted from the current directory.
  393.     echo.
  394.     echo If the patches have been applied and you no longer
  395.     echo need the files which were originally downloaded,
  396.     echo you can delete the following files:
  397.     echo.
  398.     echo apps.exe 
  399.     echo ck.exe 
  400.     echo dbhlpd.exe 
  401.     echo dbhlpw.exe 
  402.     echo foxapp.exe 
  403.     echo fpd.exe 
  404.     echo fpd_dk.exe 
  405.     echo fpw.exe 
  406.     echo fpw_dk.exe 
  407.     echo fpwhlp.exe 
  408.     echo genpd.exe
  409.     echo gens.exe 
  410.     echo wizcat.exe 
  411.  
  412.     goto final
  413.  
  414. :final
  415.  
  416.     if exist vpatch.bat del vpatch.bat
  417.  
  418.     echo.
  419.  
  420.     pause
  421.  
  422.     cls
  423.  
  424.     if exist gens.exe goto :gensnote
  425.  
  426.     goto goodbye
  427.  
  428. :gensnote
  429.  
  430.     echo WARNING!
  431.     echo.
  432.     echo The file GENS.EXE exists in the FoxPro directory.
  433.     echo This file will conflict with FoxPro.  To avoid
  434.     echo a conflict between GENS.EXE and FoxPro, please 
  435.     echo do one of the following before you execute 
  436.     echo FoxPro:
  437.     echo.
  438.     echo 1) Delete the file GENS.EXE, or
  439.     echo 2) Rename the file GENS.EXE, or
  440.     echo 3) Copy the file GENS.EXE to another
  441.     echo    location then delete the copy of GENS.EXE
  442.     echo    which currently resides in the FoxPro directory.
  443.     echo.
  444.     echo.
  445.  
  446.     pause
  447.  
  448.     goto goodbye
  449.  
  450. :goodbye
  451.  
  452.     cls
  453.  
  454.     echo The patch process is finished.
  455.     echo.
  456.     echo Thank you for using Microsoft FoxPro
  457.  
  458.  
  459.  
  460.  
  461.  
  462.  
  463.